package api

import (
	"MxShopApi/global"
	"github.com/gin-gonic/gin"
	"go.uber.org/zap"
	"net/http"
)

// 回调
func Notify(ctx *gin.Context) {
	noti, err := global.AliPayClient.GetTradeNotification(ctx.Request)
	if err != nil {
		ctx.JSON(http.StatusInternalServerError, gin.H{})
		return
	}
	zap.S().Info("返回数据:::", noti)
	if err != nil {
		ctx.JSON(http.StatusInternalServerError, gin.H{})
		return
	}
	ctx.String(http.StatusOK, "success")
}
